package com.ruoyi.Warehouse.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.Warehouse.mapper.WarehousesMapper;
import com.ruoyi.Warehouse.domain.Warehouses;
import com.ruoyi.Warehouse.service.IWarehousesService;
import com.ruoyi.common.core.text.Convert;

/**
 * 仓库表Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-16
 */
@Service
public class WarehousesServiceImpl implements IWarehousesService 
{
    @Autowired
    private WarehousesMapper warehousesMapper;

    /**
     * 查询仓库表
     * 
     * @param warehouseId 仓库表主键
     * @return 仓库表
     */
    @Override
    public Warehouses selectWarehousesByWarehouseId(Long warehouseId)
    {
        return warehousesMapper.selectWarehousesByWarehouseId(warehouseId);
    }

    /**
     * 查询仓库表列表
     * 
     * @param warehouses 仓库表
     * @return 仓库表
     */
    @Override
    public List<Warehouses> selectWarehousesList(Warehouses warehouses)
    {
        return warehousesMapper.selectWarehousesList(warehouses);
    }

    /**
     * 新增仓库表
     * 
     * @param warehouses 仓库表
     * @return 结果
     */
    @Override
    public int insertWarehouses(Warehouses warehouses)
    {
        return warehousesMapper.insertWarehouses(warehouses);
    }

    /**
     * 修改仓库表
     * 
     * @param warehouses 仓库表
     * @return 结果
     */
    @Override
    public int updateWarehouses(Warehouses warehouses)
    {
        return warehousesMapper.updateWarehouses(warehouses);
    }

    /**
     * 批量删除仓库表
     * 
     * @param warehouseIds 需要删除的仓库表主键
     * @return 结果
     */
    @Override
    public int deleteWarehousesByWarehouseIds(String warehouseIds)
    {
        return warehousesMapper.deleteWarehousesByWarehouseIds(Convert.toStrArray(warehouseIds));
    }

    /**
     * 删除仓库表信息
     * 
     * @param warehouseId 仓库表主键
     * @return 结果
     */
    @Override
    public int deleteWarehousesByWarehouseId(Long warehouseId)
    {
        return warehousesMapper.deleteWarehousesByWarehouseId(warehouseId);
    }
}
